﻿using System.Collections;

namespace CSharpPro._1020;

/*public class Demo1
{
    public static void Main()
    {
        int[] arr = new int[5];
        arr[0] = 1;
        arr[4] = 5;
        string[] arr2 = new string[5];
        arr2[0] = "1";
        arr2[4] = "5";
        Console.WriteLine();
        int[] arr3 = {1,2,3,4};
        int[,] arr4 = new int[2, 3];
        arr4[0, 0] = 1;
        arr4[1, 2] = 2;
        int[] arr6 = { 11, 33, 22, 44, 55, 66 };
        Array.Sort(arr6);//升序
        Array.Reverse(arr6);//降序
        Console.WriteLine();
        foreach (int i in arr6)
        {
            Console.WriteLine(i + "\t");
        }
        ArrayList list = new ArrayList();
        var hashtable = new Hashtable();
        list.AddRange(arr6);
        list.Add(9);
        list.Add("abe");
        list.Add(66);
        Console.WriteLine();
        foreach (int i in list)
        {
            Console.WriteLine(i + "\t");
        }
        list.Remove(66);
        list.RemoveAt(2);
        list.RemoveRange(2,2);
        Console.WriteLine();
        foreach (int i in list)
        {
            Console.WriteLine(i + "\t");
        }
        hashtable.Remove("2");
        hashtable.Add("3", "333");
        Console.WriteLine(hashtable["1"]);
        foreach (DictionaryEntry entry in hashtable)
        {
            Console.WriteLine(entry.Key + "----" + entry.Value);
        }
    }
}
*/

        